<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class MsgSendRequest extends BasicRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
        	'template'		=> 'bail|required',
            'mobile'		=> 'bail|required|size:11',
			'param'			=> 'bail|required|array',
        ];
    }
    
    public function messages()
	{
		return [
			'template.required'		=> '模板名称必填',
			'mobile.required'		=> '缺少手机号码',
			'mobile.size'			=> '手机号不是11位',
			'param.required'		=> '缺少内容匹配参数',
			'param.array'			=> '内容匹配参数格式有误',
		];
	}
}
